package com.app.mvc.model;

import java.io.Serializable;
import java.util.Date;

public class Deal implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;
	private String title;
	private double price;
	private int percentage;
	private double price_down;
	private String short_content;
	private String long_content;
	private Date count_down;
	private int status;
	private String position;
	private String image;

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	private Category category;

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getPercentage() {
		return percentage;
	}

	public void setPercentage(int percentage) {
		this.percentage = percentage;
	}

	public double getPrice_down() {
		this.price_down = price - (price * percentage / 100);
		return this.price_down;
	}

	public void setPrice_down(double price_down) {
		this.price_down = price_down;
	}

	public String getShort_content() {
		return short_content;
	}

	public void setShort_content(String short_content) {
		this.short_content = short_content;
	}

	public String getLong_content() {
		return long_content;
	}

	public void setLong_content(String long_content) {
		this.long_content = long_content;
	}

	public Date getCount_down() {
		return count_down;
	}

	public void setCount_down(Date count_down) {
		this.count_down = count_down;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Deal() {
		super();
	}

	public Deal(String title, double price, int percentage,
			String short_content, String long_content, Date count_down,
			int status, String position, String image, Category category) {
		super();
		this.title = title;
		this.price = price;
		this.percentage = percentage;
		this.short_content = short_content;
		this.long_content = long_content;
		this.count_down = count_down;
		this.status = status;
		this.position = position;
		this.image = image;
		this.category = category;
	}

}
